package byx.container.extension.aop.GlobalExceptionTest;

import byx.aop.annotation.AfterThrowing;
import byx.aop.annotation.Filter;
import byx.container.annotation.annotation.Register;
import byx.container.extension.aop.annotation.Enhance;

@Register
@Enhance({A.class, B.class})
public class ExceptionAdvice {
    @AfterThrowing
    @Filter(returnType = String.class)
    public String afterException(RuntimeException e) {
        System.out.println("发生异常: " + e.getMessage());
        return "exception";
    }
}
